package com.shiyi.design.composite;

/**
 * @author wangzhanshuai
 * @date 2021/2/2 5:05 下午
 * @since 1.0
 */
public class LeafNode extends Node {

    public LeafNode(String nodeName) {
        super(nodeName);
    }

    @Override
    public void print() {
        System.out.println(super.nodeName);
    }

    @Override
    public boolean isLeaf() {
        return true;
    }
}
